<?php include'views/templates/layouts/'.$this->layout.'/header.php'; ?>
<!--Messager-->
<?php
$messager="true";
if($messager!="")
{
    ?>
    <br>
    <div class="alert alert-success">
        <button class="close" data-dismiss="alert">×</button>
        <strong>Success!</strong> The page has been added.
    </div>
<?php
}
    ?>

<!--End Messager-->
    <div class="widget-box">
    <div class="widget-title">

        <h5>List repost</h5>
       <h5> <a href="index.php?controller=report&action=add">Add record!</a></h5>
    </div>
    <div class="widget-content nopadding">
    <table class="table table-bordered table-striped table-hover data-table">
    <thead>
    <tr>
        <th>Title</th>
        <th>Content</th>
        <th>Email</th>
        <th>Action</th>
    </tr>
    </thead>
        <tbody>
        <?php
                
            while($row = mysqli_fetch_array($listReports))
            {

        ?>
            <tr class="gradeX">
                <td><?php echo $row['title']; ?></td>
                <td><?php echo $row['content']; ?></td>
                <td ><?php echo $row['email']; ?></td>
                <td class="taskOptions">
                    <a href="index.php?controller=report&action=view&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="View"><i class="icon-th"></i></a>
                    <a href="index.php?controller=report&action=beforeedit&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="Edit"><i class="icon-edit"></i></a>
                    <a href="index.php?controller=report&action=delete&id=<?php echo $row['id']; ?>" class="tip-top" data-original-title="Delete"><i class="icon-remove"></i></a>
                </td>
            </tr>
                <?php
                    }
                ?>
        </tbody>
    </table>
             </div>
            </div>
        </div>
    </div>


<?php include'views/templates/'.$this->layout.'/footer.php'; ?>